/*
 * The Execution engine of Crossbit, containning the pointers of the major part of Crossbit.
 */
#ifndef EXECUTIONENGINE_H
#define EXECUTIONENGINE_H

#include "crossbit/common.h"
#include "crossbit/MemoryImage.h"
#include "crossbit/MemoryManager.h"
#include "crossbit/TraceManager.h"
#include "crossbit/Interpreter.h"
#include "crossbit/Translator.h"
#include "crossbit/TBlock.h"
#include "crossbit/TCache.h"
#include "crossbit/VBlockBuilder.h"
#include "crossbit/VFilter.h"
#include "crossbit/SyscallHandler.h"

namespace crossbit {

    class ExecutionEngine {
        public:
            ExecutionEngine(MemoryImage 	*memory_image, 
                            MemoryManager	*memory_manager,
                            TraceManager	*trace_manager,
                            Interpreter 	*interpreter, 
                            VBlockBuilder 	*builder, 
                            TCache 			*tcache,
                            Translator 		*translator,
                            SyscallHandler	*syscall_handler
                            ):
                  ee_memory_image(memory_image),
                  ee_memory_manager(memory_manager),
                  ee_trace_manager(trace_manager),
                  ee_interpreter(interpreter),
                  ee_builder(builder),
                  ee_tcache(tcache),
                  ee_translator(translator),
                  ee_syscall_handler(syscall_handler)
            {}

            ~ExecutionEngine() {}


            void run();

        protected:
            // major components of CrossBit
            MemoryImage	    * ee_memory_image;
            MemoryManager   * ee_memory_manager;
            TraceManager    * ee_trace_manager;
            Interpreter	    * ee_interpreter;
            Translator	    * ee_translator;
            VBlockBuilder   * ee_builder;
            TCache          * ee_tcache;
            SyscallHandler  * ee_syscall_handler;
		};

}

#endif
